/********************************************
主控芯片：STM32F405RGT6主频168Mhz
晶体频率：HSE=8Mhz  SYSCLK=168Mhz
模块型号：STM32串口初始化
通讯方式：
函数功能：Si5351时钟芯片
作者：苏夏雨
授权：未经作者允许，禁止转载
********************************************/

#ifndef _si5351a_h
#define _si5351a_h

//Si5351寄存器声明
#define SI_CLK0_CONTROL	16			// Register definitions
#define SI_CLK1_CONTROL	17
#define SI_CLK2_CONTROL	18
#define SI_SYNTH_PLL_A	26
#define SI_SYNTH_PLL_B	34
#define SI_SYNTH_MS_0		42
#define SI_SYNTH_MS_1		50
#define SI_SYNTH_MS_2		58
#define SI_PLL_RESET		177

#define SI_R_DIV_1		0			// R-division ratio definitions
#define SI_R_DIV_2		16
#define SI_R_DIV_4		32
#define SI_R_DIV_8		48
#define SI_R_DIV_16		64
#define SI_R_DIV_32		80
#define SI_R_DIV_64		96
#define SI_R_DIV_128		112

#define SI_CLK_SRC_PLL_A	0
#define SI_CLK_SRC_PLL_B	32
#define XTAL_FREQ	25000000			// Crystal frequency


//相关函数声明
 
void SetPLLClk(uint8_t pll, uint16_t mult, uint32_t num, uint32_t denom);//设置PPL时钟
void SetFrequency(uint32_t frequency);//时钟Si5351时钟频率
void SetMultisynth(uint8_t synth,uint32_t divider,uint8_t rDiv);//设置多synth
#endif
